package com.zan.rocketmqbootconsumer.listener;

import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @Author Zan
 * @Create 2024/8/30 14:50
 * @ClassName: TraceListener
 * @Description : TODO 请用一句话描述该类的功能
 */
@Component
@RocketMQMessageListener(topic = "traceTopic",
        consumerGroup = "trace-consumer-group",
        consumeThreadNumber = 32,
        consumeMode = ConsumeMode.CONCURRENTLY,
        enableMsgTrace = true) // 开启消费者方的轨迹
public class TraceListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.println("我是消费者：" + message);
    }
}
